import request from '@/utils/request'

export function newPig(data) {
  return request({
    url: '/pig/addorupdatepig',
    method: 'post',
    data
  })
}
export function listPig(data) {
  return request({
    url: '/pig/listbyeid',
    method: 'post',
    data
  })
}
export function getPigByID(data) {
  return request({
    url: '/pig/getPigByID',
    method: 'post',
    data: { id: data }
  })
}
export function deletePig(data) {
  return request({
    url: '/pig/deleteByID',
    method: 'post',
    data: { id: data }
  })
}
export function updatePassByID(data) {
  return request({
    url: '/pig/examine',
    method: 'post',
    data: { id: data.arr, type: data.type }
  })
}
